package com.woniu.cms.contract.core.controller;


import com.woniu.cms.contract.core.entity.FrameworkContractManagement;
import com.woniu.cms.contract.core.service.IFrameworkContractManagementService;
import com.woniu.common.api.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author maple leaf
 * @since 2022-09-17
 */

@RestController
@RequestMapping("/framework-contract-management")
@Api(tags = "框架合同管理")
public class FrameworkContractManagementController {

    @Autowired
    private IFrameworkContractManagementService frameworkContractManagementService;


    @ApiOperation("创建")
    @PostMapping
    public Result addAuditFrameManage(@RequestBody FrameworkContractManagement frameworkContractManagement){
        Result result = frameworkContractManagementService.addAuditFrameManage(frameworkContractManagement);
        return result;
    }

    @ApiOperation("编辑查询")
    @GetMapping("{frameworkContractCode}")
    public Result queryFramMana(@PathVariable String frameworkContractCode){
        Result result = frameworkContractManagementService.queryFramMana(frameworkContractCode);
        return result;
    }

    @ApiOperation("分页查询")
    @GetMapping
    public Result queryFrameManage(String frameworkContractCode, String clientName, Integer currentPage, Integer pageSize) {

        Result result = frameworkContractManagementService.queryFrameManage(frameworkContractCode, clientName, currentPage, pageSize);

        return result;
    }



}

